import request from '@/config/axios'

// 财税部月度考核分值明细 VO
export interface HrFinanceAssessmentDetailVO {
  userName: string // 员工姓名
  yearMonthValue: string // 考核月份(格式:YYYY-MM)
  accuracyScore: number // 准确性分值
  efficiencyScore: number // 效率分值
  complianceScore: number // 合规性分值
  innovationScore: number // 创新性分值
  teamworkScore: number // 团队协作分值
  clientFeedbackScore: number // 客户反馈分值
  workloadScore: number // 工作量分值
  specialPlusScore: number // 特殊加分
  specialMinusScore: number // 特殊减分
  totalScore: number // 总分
  scoreComment: string // 评分说明
  assessorId: string // 评分人ID
  assessorName: string // 评分人姓名
  assessTime: Date // 评分时间
}

// 财税部月度考核分值明细 API
export const HrFinanceAssessmentDetailApi = {
  // 查询财税部月度考核分值明细分页
  getHrFinanceAssessmentDetailPage: async (params: any) => {
    return await request.get({ url: `/bpm/hr-finance-assessment-detail/page`, params })
  },

  // 查询财税部月度考核分值明细详情
  getHrFinanceAssessmentDetail: async (id: number) => {
    return await request.get({ url: `/bpm/hr-finance-assessment-detail/get?id=` + id })
  },

  // 新增财税部月度考核分值明细
  createHrFinanceAssessmentDetail: async (data: HrFinanceAssessmentDetailVO) => {
    return await request.post({ url: `/bpm/hr-finance-assessment-detail/create`, data })
  },

  // 修改财税部月度考核分值明细
  updateHrFinanceAssessmentDetail: async (data: HrFinanceAssessmentDetailVO) => {
    return await request.put({ url: `/bpm/hr-finance-assessment-detail/update`, data })
  },

  // 删除财税部月度考核分值明细
  deleteHrFinanceAssessmentDetail: async (id: number) => {
    return await request.delete({ url: `/bpm/hr-finance-assessment-detail/delete?id=` + id })
  },

  // 导出财税部月度考核分值明细 Excel
  exportHrFinanceAssessmentDetail: async (params) => {
    return await request.download({ url: `/bpm/hr-finance-assessment-detail/export-excel`, params })
  },
}
